package com.ktjiaoyu.demo2;

import java.awt.*;

/**
 * @ClassName : GreyInk
 * @Description :
 * @Author : Lzz
 * @Date: 2023/9/25 10:37:20
 */
public class GreyInk implements Ink{
    @Override
    public String getColor(int red, int green, int blue) {
        int c = (red+green+blue)/3;
        Color color = new Color(c,c,c);
        return "#"+Integer.toHexString(color.getRGB()).substring(2);
    }
}
